function obj = get_doppler_obs(obj,sat)
%GET_DOPPLER_OBS 获取my_station对象观测my_sat对象的多普勒值
%   此处显示详细说明
    time_size = length(obj.trajectorys.trj);
    visible_sat = {obj.sat_obs.satobs}';
    env = enviroment;
    clock_drift_temp = obj.receiver_clock_drift.*randn(1,length(sat.timerange));%接收机钟漂
    obj.receiver_clock_drift = clock_drift_temp;
    trj_lla = obj.trajectorys.trj(:,1:3);
    trj_vel = obj.trajectorys.vel;
    trj_ecef = lla2ecef(trj_lla);
    for i = 1:time_size
        visible_sat_num = length(cell2mat(visible_sat(i)));
        sat_pos_array_error = sat.satpos_post_res(i).posvel(cell2mat(visible_sat(i)),1:3);
        sat_vel_array_error = sat.satpos_post_res(i).posvel(cell2mat(visible_sat(i)),4:6);
        sat_pos_array = sat.satpos(i).posvel(cell2mat(visible_sat(i)),1:3);
        sat_vel_array = sat.satpos(i).posvel(cell2mat(visible_sat(i)),4:6);
        obj.satpos_obs(i).satpos = [sat_pos_array_error,sat_vel_array_error];
        sensor_vel_array = enu2xyz_for_vel(trj_vel(i,:),trj_ecef(i,:))';
        sensor_pos_array = trj_ecef(i,:);
        % sensor_vel_array = obj.vel;
        P_array = sat_pos_array-sensor_pos_array;
        V_array = sat_vel_array-sensor_vel_array;
        R = vecnorm(P_array')';
        % D = sum(V_array.*(P_array./R),2)*sat.f(1)/env.c;
        obj.doppler_obs(i).doppler = -sum(V_array.*(P_array./R),2)*sat.f(1)/env.c+clock_drift_temp(i)*sat.f(1)-obj.noise_obs*randn(visible_sat_num,1);
        % obj.doppler_obs(i).doppler = -sum(V_array.*(P_array./R),2)*sat.f(1)/env.c;%不加钟漂和噪声，用于调试算法
        obj.doppler_obs(i).time = sat.timerange(i);
    end
    obj.f_obs = sat.f;
    disp("doppler观测值获取成功");
end

